// 翻译数据字典
export const getDictLabel = (list, value) => {
    const obj = list.find(item => { return item.dictValue == value })
    return obj ? obj.dictLabel : '-'
}
// 获取所有的城市
export const getCityList = () => {
    const tree = JSON.parse(localStorage.getItem('addrTree')) || []
    let list = []
    tree.list.map(item => {
        list = list.concat(item.childList)
    })
    return list
}
// 翻译城市
export const getCityLabel = (value) => {
    const list = getCityList()
    const obj = list.find(item => { return item.code == value })
    return obj ? obj.name : '-'
}